package com.marcowu.study.spb.rabbitmq.tasket;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

@Component
@RabbitListener(queues = "TestDirectQueue")
public class DirectReceiver {

  @RabbitHandler
  public void sendDirectMessage(Map testMessage) {
    System.out.println("DirectReceiver消费者收到消息  : " + testMessage.toString());
  }
}
